for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
"use strict";
const {
BrowserWindow
} = require('electron');
const path = require('path');
const url = require('url');
const touchbar = require('./touchbar');
const open = require("open");
let createWindow = () => {
let mainWindow;
mainWindow = new BrowserWindow({
width: 800,
height: 600
});
mainWindow.maximize();
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, '../views/index.html'),
protocol: 'file:',
slashes: true
}));
mainWindow.webContents.on('new-window', (event, url) => {
event.preventDefault();
open(url);
// Open the DevTools.
mainWindow.webContents.openDevTools();
touchbar.setMainWindow(mainWindow);
mainWindow.setTouchBar(touchbar.touchBar);
mainWindow.on('closed', () => {
mainWindow = null;
};
module.exports = {
createWindow: createWindow